package com.httpsender;

public class MBLevel {

	private String lvlName;
	private String userName;
	private String lvlXML;
	private int[] lvlStructure;
	
	/*
	 * The following are basic getters and setters for the object MBLevel
	 */
	public MBLevel(){
		int[] struct = {1, 2, 4};
		lvlName = "sPark";
		userName = "Cartman";
		
		lvlStructure = struct;	
	}
	
	public MBLevel(String user_name, String level_name, String xml_lvl){
		int[] struct = {1, 2, 4};
		lvlName = level_name;
		userName = user_name;
		lvlXML = xml_lvl;
		lvlStructure = null;	
	}
	
	public MBLevel(String lvlName, String userName, int[] lvlStructure){
		this.lvlName = lvlName;
		this.userName = userName;
		this.lvlStructure = lvlStructure;
	}
	
	public String get_levelName(){
		return lvlName;
	}
	
	public String get_userName(){
		return userName;
	}
	
	public int[] get_levelStructure(){
		return lvlStructure;
	}
	
	public void set_levelName(String newLvlName){
		lvlName = newLvlName;
	}
	
	public void set_userName(String newUserName){
		userName = newUserName;
	}
	
	public void set_levelStructure(int[] newLvlStructure){
		lvlStructure = newLvlStructure;
	}

	public String toString(){
		if(lvlStructure == null)
			return userName +" - " + lvlName + " \n" + lvlXML;
		
		return userName +" - " + lvlName + " {" + lvlStructure +"}";
	}
}
